package com.itheima.mall.service.umsService;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.itheima.mall.mapper.umsMapper.UmsRoleMenuRelationMapper;
import com.itheima.pojo.ums.UmsAdmin;
import com.itheima.pojo.ums.UmsRoleMenuRelation;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

@DubboService
public class UmsRoleMenuRelationServiceImpl implements UmsRoleMenuRelationApi{


    @Autowired
    private UmsRoleMenuRelationMapper umsRoleMenuRelationMapper;


    /**
     *  根据用户的id查找到角色id，菜单id
     * @param id
     * @return
     */
    @Override
    public UmsRoleMenuRelation selectOne(String id) {
        LambdaQueryWrapper<UmsRoleMenuRelation> wrapper =new LambdaQueryWrapper<>();
        wrapper.eq(UmsRoleMenuRelation::getId,id);
        UmsRoleMenuRelation umsRoleMenuRelation = umsRoleMenuRelationMapper.selectById(wrapper);
        return umsRoleMenuRelation;
    }
}
